{yun:}include file="$trainstyle/header.htm"{/yun}
<div class="training_content training_w980">
	{yun:}include file="$trainstyle/left.htm"{/yun}
  <div class="right_column frt mt20">
    <div class="right_column_border">
      <div class="right_column_h1"><span class="right_column_h1_span flt">基本信息</span></div>
	  <iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
      <form id="infoform" name="myform" method="post" target="supportiframe" action="index.php?c=info&act=save" class="layui-form" enctype="multipart/form-data">
      <ul class="Basic_in" style="position:relative">
      <div class="info_logo">
      <img id="logo" src="{yun:}$info.logo_n{/yun}" width='120' height='120' onerror="showImgDelay(this,'{yun:}$config.sy_ossurl{/yun}/{yun:}$config.sy_px_icon{/yun}',2);"/>
           <div >
			<button type="button" class="yun_bth_pic adminupload" lay-data="{imgid: 'logo',path: 'train',uid:'{yun:}$info.uid{/yun}',usertype: '4'}">上传LOGO</button>
			<input type="hidden" id="layupload_type" value="2"/>
		   </div>
	   </div>
        <li>
          <div  class="Basic_in_span"><font color="#FF0000">*</font> 机构全称：</div>
          <div class="Basic_in_right">
            
            <div class="layui-form-item">
				<div class="layui-input-block">
				  <input type="text" name="name" id="name"  lay-verify="required" placeholder="请输入机构全称" value="{yun:}$info.name{/yun}" size="80" style="display:inline;width:322px;" autocomplete="off" class="layui-input input-text">
				</div>
			</div>
            
          </div>
        </li>
        <li>
          <div  class="Basic_in_span"><font color="#FF0000">*</font> 培训方向：</div>
          <div class="Basic_in_right">
            
            <div class="layui-input-inline" style='float:left'>
		      <select name="sid" id='sidid'>
			    {yun:}if $info.sid{/yun}
		 		  {yun:}foreach item=v from=$subject_index{/yun}
	                    {yun:}if $v eq $info.sid{/yun}
	                    <option value="{yun:}$v{/yun}" selected>{yun:}$subject_name[$v]{/yun}</option>
	                    {yun:}else{/yun}
	                    <option value="{yun:}$v{/yun}" >{yun:}$subject_name[$v]{/yun}</option>
	                    {yun:}/if{/yun}
	                {yun:}/foreach{/yun}
	            {yun:}else{/yun}
	                <option value="">请选择</option>
	            {yun:}/if{/yun}
		        
		        {yun:}if !$info.sid{/yun}
			        {yun:}foreach item=v from=$subject_index{/yun}
	                	<option value="{yun:}$v{/yun}">{yun:}$subject_name[$v]{/yun}</option>
	                {yun:}/foreach{/yun}
	            {yun:}/if{/yun}
		      </select>
		    </div>
            
          </div>
        </li>
        <li>
          <div  class="Basic_in_span"><font color="#FF0000">*</font> 机构性质：</div>
          <div class="Basic_in_right">
            
            <div class="layui-input-inline" style='float:left'>
		      <select name="pr" id='prid'>
			    {yun:}if $info.pr{/yun}
		 		  {yun:}foreach item=v from=$comdata.job_pr{/yun}
	                    {yun:}if $v eq $info.pr{/yun}
	                    <option value="{yun:}$v{/yun}" selected>{yun:}$comclass_name[$v]{/yun}</option>
	                    {yun:}else{/yun}
	                    <option value="{yun:}$v{/yun}" >{yun:}$comclass_name[$v]{/yun}</option>
	                    {yun:}/if{/yun}
	                {yun:}/foreach{/yun}
	            {yun:}else{/yun}
	                <option value="">请选择</option>
	            {yun:}/if{/yun}
		        
		        {yun:}if !$info.pr{/yun}
			        {yun:}foreach item=v from=$comdata.job_pr{/yun}
	                	<option value="{yun:}$v{/yun}">{yun:}$comclass_name[$v]{/yun}</option>
	                {yun:}/foreach{/yun}
	            {yun:}/if{/yun}
		      </select>
		    </div>
		    
          </div>
        </li>
        
        <li>
          <div  class="Basic_in_span"><font color="#FF0000">*</font> 所在地区：</div>
          <div class="Basic_in_right">
          
          
          
          
          <table><tr><td>
          	<input type="hidden" id="cionly" name="cionly" value="{yun:}if empty($city_type){/yun}1{yun:}/if{/yun}">
		      <select name="provinceid" id='provinceid' value="{yun:}$info.provinceid{/yun}" lay-filter="citys">
		     		 <option value="">请选择</option>
		 		  	{yun:}foreach item=v from=$city_index{/yun}
	                    {yun:}if $v eq $info.provinceid{/yun}
	                    <option value="{yun:}$v{/yun}" selected>{yun:}$city_name[$v]{/yun}</option>
	                    {yun:}else{/yun}
	                    <option value="{yun:}$v{/yun}" >{yun:}$city_name[$v]{/yun}</option>
	                    {yun:}/if{/yun}
	                {yun:}/foreach{/yun}
	     
		      </select>
          </td>
          {yun:}if !empty($city_type){/yun}
            <td>
		      <select name="cityid" id='cityid' value="{yun:}$info.cityid{/yun}" lay-filter="citys">
		     	
	                <option value="">请选择</option>
	 		  	{yun:}foreach item=v from=$city_type[$info.provinceid]{/yun}
                    {yun:}if $v eq $info.cityid{/yun}
                    <option value="{yun:}$v{/yun}" selected>{yun:}$city_name[$v]{/yun}</option>
                    {yun:}else{/yun}
                    <option value="{yun:}$v{/yun}" >{yun:}$city_name[$v]{/yun}</option>
                    {yun:}/if{/yun}
                {yun:}/foreach{/yun}
	           
	           
			
		      </select>
            </td>
            <td id='cityshowth'>
		      <select name="threecityid" id='three_cityid' value="{yun:}$info.threecityid{/yun}" lay-filter="swIdss">
		     	<option value="">请选择</option>
	 		  	{yun:}foreach item=v from=$city_type[$info.cityid]{/yun}
                    {yun:}if $v eq $info.threecityid{/yun}
                    <option value="{yun:}$v{/yun}" selected>{yun:}$city_name[$v]{/yun}</option>
                    {yun:}else{/yun}
                    <option value="{yun:}$v{/yun}" >{yun:}$city_name[$v]{/yun}</option>
                    {yun:}/if{/yun}
                {yun:}/foreach{/yun}
	           
	                
	            
			    
		       
		      </select>
            </td>
            {yun:}/if{/yun}
            </tr></table>
            
            
            
            
            
          </div>
        </li>
        
        <li>
          <div  class="Basic_in_span"><font color="#FF0000">*</font> 机构规模：</div>
          <div class="Basic_in_right">
            
            <div class="layui-input-inline" style='float:left'>
		      <select name="mun" id='munid'>
			    {yun:}if $info.mun{/yun}
		 		  {yun:}foreach item=v from=$comdata.job_mun{/yun}
	                    {yun:}if $v eq $info.mun{/yun}
	                    <option value="{yun:}$v{/yun}" selected>{yun:}$comclass_name[$v]{/yun}</option>
	                    {yun:}else{/yun}
	                    <option value="{yun:}$v{/yun}" >{yun:}$comclass_name[$v]{/yun}</option>
	                    {yun:}/if{/yun}
	                {yun:}/foreach{/yun}
	            {yun:}else{/yun}
	                <option value="">请选择</option>
	            {yun:}/if{/yun}
		        
		        {yun:}if !$info.mun{/yun}
			        {yun:}foreach item=v from=$comdata.job_mun{/yun}
	                	<option value="{yun:}$v{/yun}">{yun:}$comclass_name[$v]{/yun}</option>
	                {yun:}/foreach{/yun}
	            {yun:}/if{/yun}
		      </select>
		    </div>
            
          </div>
        </li>
        <li>
          <div  class="Basic_in_span"><font color="#FF0000">*</font> 机构地址：</div>
          <div class="Basic_in_right">
            
            <div class="layui-form-item">
				<div class="layui-input-block">
				  <input type="text" name="address" id="address"  lay-verify="required" placeholder="请输入机构地址" value="{yun:}$info.address{/yun}"  style="display:inline;width:322px;" autocomplete="off" class="layui-input input-text">
				</div>
			</div>
            
          </div>
        </li>
        <li>
          <div  class="Basic_in_span"><font color="#FF0000">*</font> 联 系 人：</div>
          <div class="Basic_in_right">
            <div class="layui-form-item">
				<div class="layui-input-block">
				  <input type="text" name="linkman" id="linkman"  lay-verify="required" placeholder="请输入联系人" value="{yun:}$info.linkman{/yun}"  style="display:inline;width:202px;" autocomplete="off" class="layui-input input-text">
				</div>
			</div>
          </div>
        </li>
        <li>
          <div  class="Basic_in_span"><font color="#FF0000">*</font> 座机电话：</div>
          <div class="Basic_in_right">
            
            <div class="layui-form-item">
				<div class="layui-input-block">
				  <input type="text" name="linkphone" id="linkphone"  lay-verify="required" placeholder="请输入座机电话" value="{yun:}$info.linkphone{/yun}" onkeyup="this.value=this.value.replace(/[^0-9-]/g,'')" style="display:inline;width:202px;" autocomplete="off" class="layui-input input-text">
				  <span>如：025-83356669</span>
				</div>
			</div>
            
          </div>
        </li>
        <li>
          <div  class="Basic_in_span"><font color="#FF0000">*</font> 手机号码：</div>
          <div class="Basic_in_right" style="line-height: 38px;">
            {yun:}if $info.moblie_status==1{/yun}
            {yun:}$info.linktel{/yun} <a href="index.php?c=binding" style="color:red;">重新认证</a>
             <input type="hidden" id="linktel" name="linktel" value="{yun:}$info.linktel{/yun}">
            {yun:}else{/yun}
            <div class="layui-form-item">
				<div class="layui-input-block">
				  <input type="text" name="linktel" id="linktel"  lay-verify="required" placeholder="请输入手机号码" value="{yun:}$info.linktel{/yun}" onkeyup="this.value=this.value.replace(/[^0-9-]/g,'')" style="display:inline;width:202px;" autocomplete="off" class="layui-input input-text">
				</div>
			</div>
            {yun:}/if{/yun}
          </div>
        </li>
        <li>
			<div  class="Basic_in_span"><font color="#FF0000">*</font> 成立时间：</div>
			<div class="Basic_in_right">
				<div class="layui-input-inline">
					<input type="text" class="layui-input" name="sdate" style="display:inline;width:202px;" value="{yun:}$info.sdate{/yun}" id="sdate" lay-key="1">
				</div>
			</div>
        </li>
        <li>
			<div  class="Basic_in_span"><font color="#FF0000">*</font> 机构简介：</div>
			<div class="Basic_in_right">
 				<script id="content" name="content" type="text/plain" style="width:500px; height:120px;"> {yun:}$info.content{/yun} </script>
			</div>
        </li>
        <li>
          <div  class="Basic_in_span"> 联系邮箱：</div>
          <div class="Basic_in_right" style="line-height: 38px;">
            {yun:}if $info.email_status==1{/yun}
            {yun:}$info.linkmail{/yun}<a href="index.php?c=binding" style="color:red;">  重新认证</a>
              <input type="hidden" id="linkmail" value="{yun:}$info.linkmail{/yun}">
            {yun:}else{/yun}
            
            <div class="layui-form-item">
				<div class="layui-input-block">
				  <input type="text" name="linkmail" id="linkmail"  lay-verify="required" placeholder="请输入联系邮箱" value="{yun:}$info.linkmail{/yun}"  style="display:inline;width:202px;" autocomplete="off" class="layui-input input-text">
				</div>
			</div>
            
			{yun:}/if{/yun}
          </div>
        </li>
        <li>
          <div  class="Basic_in_span"> 联系Q Q：</div>
          <div class="Basic_in_right">
            <div class="layui-form-item">
				<div class="layui-input-block">
				  <input type="text" name="linkqq" id="linkqq"  lay-verify="required" placeholder="请输入联系QQ" value="{yun:}$info.linkqq{/yun}"  style="display:inline;width:202px;" autocomplete="off" class="layui-input input-text">
				</div>
			</div>
          </div>
        </li>
        <li>
          <div  class="Basic_in_span">机构网址：</div>
          <div class="Basic_in_right">
            <div class="layui-form-item">
				<div class="layui-input-block">
				  <input type="text" name="website" id="website"  lay-verify="required" placeholder="如：{yun:}$config.sy_weburl{/yun}" value="{yun:}$info.website{/yun}"  style="display:inline;width:202px;" autocomplete="off" class="layui-input input-text">
				</div>
			</div>
            </div>
        </li> 

        <li>
          <div  class="Basic_in_span">&nbsp;</div>
          <div class="Basic_in_right">
            <input type="button" onclick="checkpost()" value="提交" class="Basic_in_bth">
          </div>
        </li>
      </ul>
      </form>
    </div>
  </div>
</div>
<style>
.layui-form-item {margin-bottom: 0px;clear: both;}
.layui-input-block {margin-left: 0px;}
.Basic_in_span {line-height: 38px;}
.layui-select-title{width:158px;}
.layui-form-select{width:158px;margin-right:5px;}
</style>

<script src="{yun:}$config.sy_weburl{/yun}/js/public.js?v={yun:}$config.cachecode{/yun}"></script>
<script language="javascript">
  layui.use(['form'], function(){
  });
  
  layui.use('laydate', function(){
	  var laydate = layui.laydate;
	  //常规用法
	  laydate.render({
	    elem: '#sdate',type:'month'
	  });
  })
function selecttype(id,type,name){
	$("#"+type).hide();
	$("#"+type+"_button").val(name);
	$("#"+type+"id").val(id);
}
function checkpost(){
	var cionly	=	$.trim($("#cionly").val());
	if($.trim($("#name").val())==""){
		layer.msg('机构全称不能为空！',2,8);return false;
	}
	if($("#sidid").val()==""){
		layer.msg('请选择培训方向！',2,8);return false;
	}
	if($("#prid").val()==""){
		layer.msg('请选择机构性质！',2,8);return false;
	}
	
	if(cionly=='1'){
		if($("#provinceid").val()==""){
			layer.msg('请选择所在地区！',2,8);return false;
		}
	}else{
		if($("#cityid").val()==""){
			layer.msg('请选择所在地区！',2,8);return false;
		}
	}
	
	if($("#munid").val()==""){
		layer.msg('请选择机构规模！',2,8);return false;
	}
	if($.trim($("#address").val())==""){
		layer.msg('机构地址不能为空！',2,8);return false;
	} 
	if($.trim($("#linkman").val())==""){
		layer.msg('联系人不能为空！',2,8);return false;
	}
	if($.trim($("#linkphone").val())==""){
		layer.msg('座机电话不能为空！',2,8);return false;
	}
	if($.trim($("#linktel").val())==""){
		layer.msg('手机号码不能为空！',2,8);return false;
	}
	if(isjsMobile($("#linktel").val())==false){
		layer.msg('手机号码格式错误！',2,8);return false;
	}
	if($.trim($("#sdate").val())==""){
		layer.msg('成立时间不能为空！',2,8);return false;
	}
	var html = UE.getEditor('content').getContent();
	if(html==""){
		layer.msg('机构简介不能为空！',2,8);return false;
	}
	var email = $.trim($("#linkmail").val());
	if(email!=""&&check_email(email)==false){
		layer.msg('联系邮箱格式错误！',2,8);return false;
	}
	$("#infoform").submit();
	layer.load('执行中，请稍候...',0);
}
</script>
<script language=javascript src='{yun:}$config.sy_weburl{/yun}/data/plus/city.cache.js?v={yun:}$config.cachecode{/yun}'></script>
<script language=javascript src='{yun:}$config.sy_weburl{/yun}/js/city.js?v={yun:}$config.cachecode{/yun}'></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui.upload.js?v={yun:}$config.cachecode{/yun}" type='text/javascript'></script> 

<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.config.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.all.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script language="javascript">
	var editor = UE.getEditor('content',{
		toolbars:[[ 'Source','|', 'Undo', 'Redo','Bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'fontfamily', 'fontsize',  'forecolor', 'backcolor', 'removeformat', 'autotypeset', 'pasteplain', '|','insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|','simpleupload', '|', 'indent', '|','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify']],wordCount:false,elementPathEnabled:false,initialFrameHeight:120
	});
</script>
{yun:}if $isremind == 1{/yun}
{yun:}include file="$temstyle/member/public/remind.htm"{/yun}
{yun:}/if{/yun}
{yun:}include file="$trainstyle/footer.htm"{/yun}